1. Field of the Invention
The present invention relates to a communications protocol and, more particularly, to a method and apparatus for processing messages using group ordering.
2. Description of the Related Art
Communications devices that transmit data over a network commonly use datagrams, which are packets of data. These packets arrive in any order. Most known communication protocols assume that the user desires to process the packets in the order in which they were sent.
TCP and OSI use unique sequence numbers within the packets so that the protocol can process the packets in the order sent. See, e.g., Samuel J. Leffler et at., The Design and Implementation of the 4.3BSD UNIX Operating System, Addison-Wesley, Reading, Ma, 1990; and William Stallings, The Open Systems (OSI) Model and OSI-Related Protocols, Handbook of Computer Communications Standards, Vol. 1, Stallings/MacMillan, New York, 1990. The Sprite Remote Procedure Call System (RPC) is another known protocol which uses a sequence number, but here the sequence number is not unique and indicates whether the incoming message applies to an old RPC, a current RPC, or a new RPC. See, e.g., Brent B. Welch, The Sprite Remote Procedure Call System, Engineering and Computer Sciences, UC Berkley, July 1986. The sequence number of all the messages associated with a particular RPC are the same, and the start of a new RPC is signaled by a message with a larger sequence number. Only one RPC can be active on the sending side at a time. Hence, a receiver can begin processing a new RPC as soon as its first message arrives, but doing so discards any subsequent messages from earlier RPC's.
The channel model is yet another communications protocol. Here, communications between nodes proceed over typed channels. Messages sent along a single channel are processed in the order sent, and messages sent along different channels are processed in the order received. Since the channels are typed, only one type of message can be sent on a channel. If ordering between messages of different types must be preserved, the channel model allows channels to be grouped. Message order is preserved for all messages within a group. Channels can be included in more than one group.
The channel model scheme imposes sender ordering on messages sent on a channel group using a separate sequence number for each group the channel belongs to. Every time a message is sent, all its sequence numbers are set to one more than the previous values for channels in the group. The receiver makes sure that a message is not processed until all sequence numbers one less than those appearing in its list have been processed. Two messages that do not have a group in common can be processed in any order. Although channel model allows ordering to be imposed on messages sent on different channels, it lacks the flexibility desired by those in the art.
Thus, what is needed is a flexible communication protocol that allows messages sent over a channel to be ordered or not ordered on a per message basis at the sender's discretion.